home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 22 / CU Amiga Magazine's Super CD-ROM 22 (1998)(EMAP Images)(GB)[!][issue 1998-05].iso / PowerPC / Programming / PPCSmallEiffel / bin_c / compile_to_jvm22.c < prev    next >
Encoding:
C/C++ Source or Header  |  1998-01-16  |  3.7 KB  |  145 lines

  1. /*
  2. -- ANSI C code generated by :
  3. -- SmallEiffel The GNU Eiffel Compiler -- Release (- 0.82)      --
  4. -- Copyright (C), 1994-98 - LORIA - UHP - CRIN - INRIA - FRANCE --
  5. -- Dominique COLNET and Suzanne COLLIN -    colnet@loria.fr     --
  6. --                 http://www.loria.fr/SmallEiffel              --
  7. */
  8. #include "compile_to_jvm.h"
  9. int r239is_integer(T239* C){
  10. int R=0;
  11. R=X291is_integer((((T239*)C))->_run_type/*8*/);
  12. return R;
  13. }
  14. void r239anchor_cycle_end(T239* C){
  15. /*IF*/if (((((T239*)C))->_start_position/*4*/)==((void*)(/*(IRF4.5first*//*(IRF4.6item*/((((T907*)((T907*)(oBC646visited))))->_storage/*0*/)[0]/*)*//*)*/))) {
  16. /*[IRF3.3clear*/((((T907*)(((T907*)(oBC646visited)))))->_upper)=(-(1));
  17. /*]*/
  18. }
  19. /*FI*/}
  20. T0* r342add_comment(T342* C,T0* a1){
  21. T0* R=NULL;
  22. /*IF*/if (((a1)==((void*)(NULL)))||((/*(IRF4.6count*/r52count(((T52*)((((T393*)((T393*)a1)))->_list/*4*/)))/*)*/)==(0))) {
  23. R=(T0*)C;
  24. }
  25. else {
  26. {T529*n=malloc(sizeof(*n));
  27. *n=M529;
  28. r529make(n,(T0*)C,a1);
  29. R=(T0*)n;
  30. }
  31. }
  32. /*FI*/return R;
  33. }
  34. /*No:INTEGER_CONSTANT.to_integer*/
  35. int r342is_a(T342* C,T0* a1){
  36. int R=0;
  37. R=X291is_a(/*(IRF4.4run_type*/((T0*)((T788*)r342result_type()))/*)*/,X291run_type(X662result_type(a1)));
  38. /*IF*/if (!(R)) {
  39. r683add_position((((T342*)C))->_start_position/*12*/);
  40. r342error(X662start_position(a1),((T0*)ms4_662));
  41. }
  42. /*FI*/return R;
  43. }
  44. /*No:INTEGER_CONSTANT.is_current*/
  45. /*No:INTEGER_CONSTANT.jvm_branch_if_false*/
  46. /*No:INTEGER_CONSTANT.static_value*/
  47. void r342make(T342* C,int a1,T0* a2){
  48. C->_value=a1;
  49. C->_start_position=a2;
  50. }
  51. /*No:INTEGER_CONSTANT.compile_to_jvm_assignment*/
  52. /*No:INTEGER_CONSTANT.fz_iinaiv*/
  53. /*No:INTEGER_CONSTANT.jvm_branch_if_true*/
  54. void r342unary_minus(T342* C){
  55. C->_value=-((((T342*)C))->_value/*16*/);
  56. }
  57. /*No:INTEGER_CONSTANT.start_position*/
  58. /*No:INTEGER_CONSTANT.compile_to_jvm_old*/
  59. T0* r342to_runnable(T342* C,T0* a1){
  60. T0* R=NULL;
  61. /*IF*/if (((((T342*)C))->_current_type/*8*/)==((void*)(NULL))) {
  62. C->_current_type=a1;
  63. R=(T0*)C;
  64. }
  65. else {
  66. R=r342twin(C);
  67. /*[IRF3.3set_current_type*/((((T342*)(((T342*)R))))->_current_type)=(a1);
  68. /*]*/
  69. }
  70. /*FI*/return R;
  71. }
  72. int fBC342result_type=0;
  73. T0*oBC342result_type=NULL;
  74. T0* r342result_type(void){
  75. if (fBC342result_type==0){
  76. T0* R=NULL;
  77. fBC342result_type=1;
  78. {T788*n=malloc(sizeof(*n));
  79. *n=M788;
  80. r788make(n,NULL);
  81. R=(T0*)n;
  82. }
  83. oBC342result_type=R;}
  84. return oBC342result_type;}
  85. /*No:INTEGER_CONSTANT.is_result*/
  86. T0* r342twin(T342* C){
  87. T0* R=NULL;
  88. R=malloc(sizeof(*C));
  89. *((T342*)R)=*C;
  90. return R;
  91. }
  92. /*No:INTEGER_CONSTANT.set_current_type*/
  93. int r342is_static(T342* C){
  94. int R=0;
  95. C->_static_value_mem=(((T342*)C))->_value/*16*/;
  96. R=1;
  97. return R;
  98. }
  99. int r342compile_to_jvm_into(T342* C,T0* a1){
  100. int R=0;
  101. R=r342standard_compile_to_jvm_into(C,a1);
  102. return R;
  103. }
  104. /*No:INTEGER_CONSTANT.compile_target_to_jvm*/
  105. /*No:INTEGER_CONSTANT.value*/
  106. /*No:INTEGER_CONSTANT.can_be_dropped*/
  107. /*No:INTEGER_CONSTANT.current_type*/
  108. /*No:INTEGER_CONSTANT.jvm_assign*/
  109. /*No:INTEGER_CONSTANT.static_value_mem*/
  110. /*No:INTEGER_CONSTANT.is_manifest_string*/
  111. /*No:INTEGER_CONSTANT.is_void*/
  112. /*No:INTEGER_CONSTANT.compile_to_jvm*/
  113. T0* r342to_real_constant(T342* C){
  114. T0* R=NULL;
  115. {T936*n=malloc(sizeof(*n));
  116. *n=M936;
  117. r936make(n,(((T342*)C))->_start_position/*12*/,r2to_string((((T342*)C))->_value/*16*/));
  118. R=(T0*)n;
  119. }
  120. return R;
  121. }
  122. /*No:INTEGER_CONSTANT.is_pre_computable*/
  123. /*No:INTEGER_CONSTANT.use_current*/
  124. void r342error(T0* a1,T0* a2){
  125. r683add_position(a1);
  126. r683error(((T683*)(oBC364eh)),a2);
  127. }
  128. int r342isa_dca_inline_argument(T342* C){
  129. int R=0;
  130. /*IF*/if (r342is_static(C)) {
  131. R=-(1);
  132. }
  133. /*FI*/return R;
  134. }
  135. int r342standard_compile_to_jvm_into(T342* C,T0* a1){
  136. int R=0;
  137. /*[IRF3.6compile_to_jvm*/{T342* C1=C;
  138. r256opcode_push_integer(((T256*)(oBC364code_attribute)),(((T342*)C1))->_value/*16*/);
  139. }/*]*/
  140. R=X291jvm_convert_to(/*(IRF4.4run_type*/((T0*)((T788*)r342result_type()))/*)*/,a1);
  141. return R;
  142. }
  143. /*No:INTEGER_CONSTANT.afd_check*/
  144.  
  145.